Fix TypeScript type error: allow boolean in renderTemplate context #10439
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The CI failure in PR #10421 was a TypeScript compilation error, not related to MCP Gateway format changes. The
renderTemplate()function inmessages_core.cjsonly acceptedstring | number | undefinedbut received boolean values fromhandle_agent_failure.cjs.Changes
actions/setup/js/messages_core.cjs:Context
The error manifested at lines 292 and 338 in
handle_agent_failure.cjswheresecret_verification_failed: String(...)was passed torenderTemplate(). TypeScript flagged the boolean type before runtime string conversion.Original prompt
This section details on the original issue you should resolve
<issue_title>[CI Failure Doctor] JS tests failed after PR #10421 merged - MCP Gateway format change broke tests</issue_title>
<issue_description># 🏥 CI Failure Investigation - Run githubnext/gh-aw#21089437610
PR #10421 was merged to
maindespite the JS test job failing. This indicates a CI configuration issue where required checks are not properly blocking merges.Summary
The CI workflow run for commit
bb65d5921db32c7f27be4c37e47e8ed54b7359b4(PR #10421) failed due to JavaScript test failures in thejsjob. The PR introduced changes to MCP Gateway schema validation, changing from Docker command format to the new container-based format specified in the MCP Gateway Specification v1.0.0.Failure Details
bb65d5921db32c7f27be4c37e47e8ed54b7359b4pushtomainjs(Job ID: 60658521863)cd actions/setup/js && npm testRoot Cause Analysis
Changes Made in PR #10421
The PR changed MCP Gateway config format from legacy Docker commands to the new MCP Gateway container-based format:
Before:
{ "type": "stdio", "command": "docker", "args": ["run", "--rm", "-i", "mcp/ast-grep:latest"] }After:
{ "type": "stdio", "container": "mcp/ast-grep:latest" }Files Modified
pkg/workflow/mcp-config.go:containerfield todocker runcommandscontainer+versioninto single image stringcontainer,entrypoint,entrypointArgs,mountspkg/workflow/mcp_container_args_test.go:result.Containerinstead ofresult.Command == "docker"Lock files regenerated (5 workflows):
.github/workflows/brave.lock.yml.github/workflows/go-pattern-detector.lock.yml.github/workflows/mcp-inspector.lock.yml.github/workflows/notion-issue-summary.lock.yml.github/workflows/scout.lock.ymlFailure Hypothesis
The JavaScript test job (
actions/setup/js && npm test) failed, suggesting:Investigation Findings
What We Know
✅ Go tests passed - The
⚠️ Merged despite failure - PR was merged even though required tests failed
mcp_container_args_test.gowas updated correctly✅ Workflow compilation succeeded - Lock files were regenerated successfully
❌ JS tests failed - The
jsjob failed at "Run tests" stepWhat Needs Investigation
jsjob?Recommended Actions
Immediate (Priority 1)
cd actions/setup/js && npm ci && npm testto reproduce failureShort-term (Priority 2)
Long-term (Priority 3)
jsjob a required check that blocks mergesPrevention Strategies
CI Configuration
jsjob is marked as required in branch protection rulesjsjob to passTesting Strategy
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.